package alibaba.client.service;

/**
 * In each of the services, when the snapshotNumber is not to be used, pass 0. 
 */
public interface ClientBackupService {
    
    public ClientBackupServiceResponse backupFile(String fileName, String userName);
    public ClientBackupServiceResponse restoreFile(String fileName, String userName, int snapshotNumber);
    public ClientBackupServiceResponse backupDir(String dirName, String userName);
    public ClientBackupServiceResponse restoreDir(String dirName, String userName, int snapshotNumber);
    
    /**
     * @return actual directory listing (in case of successful action) is in the messageBody of the service response
     * it should be casted to List<String>
     */
    public ClientBackupServiceResponse listDir(String dirName, String userName, int snapshotNumber);
    
    /**
     * @return actual directory listring and signatures will be located in the message body of the service response
     * it should be casted to List<CheckEntry>
     */
    public ClientBackupServiceResponse checkDir(String dirName, String userName);

    public ClientBackupServiceResponse createSnapshot(String userName, int snapshotNumber);
    public ClientBackupServiceResponse deleteSnapshot(String userName, int snapshotNumber);
    
}
